import { createStore, applyMiddleware, compose } from 'redux'
import thunk from 'redux-thunk'

// 导入reducer
import rootReducer from './reducers'

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
// thunk是处理异步action的
const store = createStore(rootReducer,composeEnhancers(applyMiddleware(thunk)))

export default store